//
//  DetailMessageCell.m
//  BigToBig
//
//  Created by liuyi on 7/20/16.
//  Copyright © 2016 cn.cloudtp. All rights reserved.
//

#import "DetailMessageCell.h"

@implementation DetailMessageCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self createSubViews];
    }
    return self;
}

- (void)createSubViews{
    // 融资总额
    UILabel *totalLabel = [[UILabel alloc]initWithFrame:CGRectMake(15, 0, kScreenWidth/9 * 2 - 15, 80)];
    [self.contentView addSubview:totalLabel];
    totalLabel.text = @"融资总额 : ";
    totalLabel.textColor = [UIColor lightGrayColor];
    totalLabel.font = [UIFont systemFontOfSize:14];
    totalLabel.textAlignment = NSTextAlignmentLeft;
    
    self.messageTotalLabel = [[UILabel alloc]initWithFrame:CGRectMake(kScreenWidth / 9 * 2, 0, kScreenWidth / 9 , 80)];
    _messageTotalLabel.textColor = [UIColor redColor];
    _messageTotalLabel.font = [UIFont systemFontOfSize:15];
    _messageTotalLabel.textAlignment = NSTextAlignmentLeft;
    [self.contentView addSubview:_messageTotalLabel];
    
    // 出让股权
    UILabel *stockLabel = [[UILabel alloc]initWithFrame:CGRectMake(kScreenWidth / 3 + 15, 0, kScreenWidth / 9 * 2 - 15, 80)];
    [self.contentView addSubview:stockLabel];
    stockLabel.text = @"出让股权 : ";
    stockLabel.textColor = [UIColor lightGrayColor];
    stockLabel.font = [UIFont systemFontOfSize:14];
    stockLabel.textAlignment = NSTextAlignmentLeft;
    
    self.messageStockLabel = [[UILabel alloc]initWithFrame:CGRectMake(kScreenWidth / 9 * 5 , 0, kScreenWidth / 9 , 80)];
    _messageStockLabel.textColor = [UIColor redColor];
    _messageStockLabel.font = [UIFont systemFontOfSize:15];
    _messageStockLabel.textAlignment = NSTextAlignmentLeft;
    [self.contentView  addSubview:_messageStockLabel];
    
    // 众筹份数
    UILabel *raiseLabel = [[UILabel alloc]initWithFrame:CGRectMake(kScreenWidth / 3 * 2 + 15, 0, kScreenWidth / 9 * 2- 15, 80)];
    [self.contentView addSubview:raiseLabel];
    raiseLabel.text = @"众筹份数 : ";
    raiseLabel.textColor = [UIColor lightGrayColor];
    raiseLabel.font = [UIFont systemFontOfSize:14];
    raiseLabel.textAlignment = NSTextAlignmentLeft;
    
    self.messageRaiseLabel = [[UILabel alloc]initWithFrame:CGRectMake(kScreenWidth / 9 * 8 , 0, kScreenWidth / 9 , 80)];
    _messageRaiseLabel.textColor = [UIColor redColor];
    _messageRaiseLabel.font = [UIFont systemFontOfSize:15];
    _messageRaiseLabel.textAlignment = NSTextAlignmentLeft;
    [self.contentView addSubview:_messageRaiseLabel];
    
    // 分割线1
    UILabel *firstLine = [[UILabel alloc]initWithFrame:CGRectMake(0, 79, kScreenWidth, 1)];
    firstLine.backgroundColor = COLOR_RGBA(247, 247, 247, 1);
    [self.contentView addSubview:firstLine];
    
    // 资金用途
    self.fundUseLabel = [[UILabel alloc]initWithFrame:CGRectMake(15, 80, kScreenWidth - 32, 80)];
    [self.contentView addSubview:_fundUseLabel];
    _fundUseLabel.text = @"资金用途 : ";
    _fundUseLabel.textColor = [UIColor lightGrayColor];
    _fundUseLabel.font = [UIFont systemFontOfSize:15];
    _fundUseLabel.textAlignment = UITextAlignmentLeft;

    // 分割线2
    UILabel *secondLine = [[UILabel alloc]initWithFrame:CGRectMake(0, 159, kScreenWidth, 1)];
    secondLine.backgroundColor = COLOR_RGBA(247, 247, 247, 1);
    [self.contentView addSubview:secondLine];
    
    // 资金外核心需求
    self.coreRequirementLabel = [[UILabel alloc]initWithFrame:CGRectMake(15, 160, kScreenWidth - 32, 80)];
    [self.contentView addSubview:_coreRequirementLabel];
    _coreRequirementLabel.text = @"资金外核心需求 : ";
    _coreRequirementLabel.textColor = [UIColor lightGrayColor];
    _coreRequirementLabel.font = [UIFont systemFontOfSize:15];
    _coreRequirementLabel.textAlignment = UITextAlignmentLeft;
    
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
